package com.xisoft.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@PropertySource(value = {"classpath:/config/DB.properties"})
@Configuration
@EnableCaching
public class DBConfig extends CachingConfigurerSupport {
    /**
     * 数据库连接驱动类
     */
    @Value("${xisoft.db.driver}")
    public String DRIVER;

    /**
     * 数据库连接URL
     */
    @Value("${xisoft.db.url}")
    public String URL;

    /**
     * 数据库连接用户名
     */
    @Value("${xisoft.db.user}")
    public String USER;

    /**
     * 数据库连接密码
     */
    @Value("${xisoft.db.password}")
    public String PASSWORD;

    /**
     * #数据源分类
     */
    @Value("${xisoft.db.group}")
    public String group;

//    @Value("${xisoft.db.table_schema}")
    public String table_schema;

    /**
     * 代码生成文件存放的基础路径:你生成的文件要放的位置！
     */
    @Value("${xisoft.code.basepath}")
    public String BASE_PATH;

    @Value("${xisoft.code.basePackageName}")
    public String BASEPACKAGENAME;

    @Value("${xisoft.code.author}")
    public String AUTHOR;

    //@Value("${xisoft.code.table2packagename}")
    public String TABLE2PACKAGENAME = "N";
}
